argoservice Tester view

Administration Debug argoservice Tester   argoservice Tester view

The argoservice Tester view allows you to test both basic and generic Web Service APIs within N4 without pulling on your other Web Service resources. This is designed to be a development tool and requires the DEBUG_SYSTEM privilege to access.

To test an API:

  1. Specify the URL of the service to be tested.

If N4 is running with an application server, the URL will default to that of the current node. You can change the URL to point to an external application, such as another N4 instance, or leave blank to perform an internal test. An internal test does not use the Web Service protocol.

  1. Enter your Username.

  2. Enter your Password.

  3. Enter the Scope to be used for testing.

  4. Enter the Handler ID. This is the name of the code extension to be called in case you are using CUSTOM API messages instead of groovy scripts.

  5. Select the Use REST API checkbox to invoke the REST service to send the request. Clear the checkbox (default) to use the SOAP web service to make the request.

  6. In the left pane, select the Request node from the tree view.

Enter the request XML message you want to test in the field to the right.

Below the Request node are the various sub-nodes, such as GATE, GOS, EVENT, and BILLING. From these you can select specific API calls to be tested. Each call comes with a sample message that can be edited.

  1. Execute the request by clicking either the Send Basic Request, Send Generic Request, or Send External Request button.

The Send External Request button is used when you are testing GOS calls.

The results of your request display on the right when you have the Response node, or one of its sub-nodes, selected.

You can use the Export XSD File button to export the XSD for the selected API. When you click this button, N4 exports the XSD file of the selected Web Service request or response and a sample request XML string to the specified directory.

Notes

 

Use argoservice Tester in the batch mode

You can also use the argoservice Tester to parse and execute multi-line Groovy scripts consisting of XML elements. The argoservice Tester supports multiple Groovy commands, file inclusion, and variable substitution. The script processor parses the input XML elements in the request by substituting variable values and expanding included files. It then executes the resulting Groovy elements in the request, and provides live status reports as part of the response.

You can use the Send Script Request button to send a multi-line Groovy script as a request. You can type or paste none or more XML script elements in the Request panel and click the Send Script Request button. When you click the Send Script Request button, N4 executes the script and displays the parsing and execution reports as it occurs.

If you click the button without specifying any XML script elements in the Request panel, N4 displays a summary of the recognized XML elements and their formats in the Response panel. The recognized XML elements are:

<echo text="text_message"/>

Or

<echo>

<text>text_message</text>

...

</echo>

<var name="var_name" value="XXX"/>

<echo text="var_name: expected=XXX actual=${var_name}"/>

The inclusion is in-line (any previous variables are applied) and you can nest include elements in other include elements or other elements. You can also use the var element to define file locations or file names and use the variables in the include element.

<var name="var_name" value="client_file_path\file_name.xml"/>

<include file="${var_name}"/>

Or

<include file="client_file_path\file_name.xml"/>

<pause msec="3000"/>

<groovy class-location="class_location_for_the_Groovy" class-directory="class_directory_for_the_Groovy" class-name="class_name_for_the_Groovy">                 

<parameters>

<parameter id="param1" value="param1_value" />                   

<parameter id="param2" value="param2_value" />     

</parameters>             

</groovy>

The following is a sample file that uses the recognized elements defined above:

<quiet/>

<echo text="test echo attr"/>

<echo>

<text>test echo ele 1 of 2</text>

<text>test echo ele 2 of 2</text>

</echo>

 

<verbose/>

<var name="UNIT" value="XXX"/>

<echo text="UNIT: expected=XXX actual=${UNIT}"/>

 

<var name="FILE" value="SPECIFY THE PATH AND NAME OF THE FILE YOU WANT TO INCLUDE."/>

<echo text="(including file '${FILE}')"/>

<include file="${FILE}"/>

<echo text="UNIT: expected=YYY actual=${UNIT}"/>

 

<quiet/>

<pause msec="3000"/>

 

<groovy class-location="classpath" class-directory="test/extension/groovy" class-name="TestCommand">                 

<parameters>

<parameter id="command" value="PurgeUnit" />                   

<parameter id="unitId" value="${UNIT}" />     

</parameters>             

</groovy>

 

<var name="UNIT" value="ZZZ"/> 

<echo text="UNIT: expected=ZZZ actual=${UNIT}"/>

 

<groovy class-location="classpath" class-directory="test/extension/groovy" class-name="TestCommand">                 

<parameters>

<parameter id="command" value="PurgeUnit" />                   

<parameter id="unitId" value="${UNIT}" />     

</parameters>             

</groovy>